package com.yanxiaohui.order.service;

import com.yanxiaohui.order.mapper.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Description TODO
 * @Author： yanxh<br>
 * @Date 2019/11/12 16:27<br>
 * @Version 1.0<br>
 */
@Service
public class OrderService {

    @Autowired
    private OrderMapper orderMapper;


    @Transactional(transactionManager = "orderTransactionManager")
    public int addOrder(String name){
        int i = orderMapper.addOrder(name);
        return i;
    }
}
